package com.mjx.algorithm.oj;

import java.util.Scanner;

/**
 * Created by 梅京翔 on 2017 02 08下午 8:15.
 */
public class problem1051 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Integer number = scanner.nextInt();
        Integer result = new Integer(0);
        Integer length;
        boolean isLess0 = false;
        if (number < 0){
            isLess0 = true;
            number *=-1;
        }
        length = number.toString().length() - 1;
        while (number > 0){
            int n = number % 10;
            result+=n * (int) Math.pow(10,length--);
            number/=10;
        }
        if (isLess0)
            System.out.print("-");
        System.out.println(result);
    }
}
